/* 
 * Copyright (C) 2015 fede
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package Entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 *
 * @author fede
 */
@Entity
public class WeatherForecast implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    private int descriptionId;
    private String description;
    private String icon;
    private Float temperature;

    /**
     * this method get the description of WeatherForecast
     *
     * @return description id ad Int
     */
    public int getDescriptionId() {
        return descriptionId;
    }

    /**
     * this method set the description of WeatherForecast
     *
     * @param descriptionId as Int
     */
    public void setDescriptionId(int descriptionId) {
        this.descriptionId = descriptionId;
    }

    /**
     * this method get the temperature of WeatherForecast
     *
     * @return temperature as Float
     */
    public Float getTemperature() {
        return temperature;
    }

    /**
     * this method set the temperature of WeatherForecast
     *
     * @param temperature as Float
     */
    public void setTemperature(Float temperature) {
        this.temperature = temperature;
    }

    /**
     * this method get the description of WeatherForecast
     *
     * @return description as string
     */
    public String getDescription() {
        return description;
    }

    /**
     * this method set the description of WeatherForecast
     *
     * @param description as String
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * this method get the Icon of WeatherForecast
     *
     * @return icon as string
     */
    public String getIcon() {
        return icon;
    }

    /**
     * this method set the description of WeatherForecast
     *
     * @param icon as string
     */
    public void setIcon(String icon) {
        this.icon = icon;
    }

    /**
     * this method get the Id of WeatherForecast
     *
     * @return id as long
     */
    public Long getId() {
        return id;
    }

    /**
     * this method set the Id of WeatherForecast
     *
     * @param id as Long
     */
    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof WeatherForecast)) {
            return false;
        }
        WeatherForecast other = (WeatherForecast) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.WeatherForecast[ id=" + id + " ]";
    }

}
